package org.jks.model;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.google.gson.annotations.Expose;

@Entity
@Table(name = "ForApply")
public class ForApply {
	@Id
	@GeneratedValue(generator = "increment")
	@GenericGenerator(name = "increment", strategy = "increment")
	@Expose
	private long Id;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Expose
	private Date Time;
	
	@OneToMany(mappedBy = "ForApply", cascade = { CascadeType.ALL }, orphanRemoval = true)
	@Expose
	private List<ForApplyOrder> Orders;
	
	public long getId() {
		return Id;
	}
	
	public void setId(long id) {
		Id = id;
	}
	
	public Date getTime() {
		return Time;
	}
	
	public void setTime(Date time) {
		Time = time;
	}
	
	public List<ForApplyOrder> getOrders() {
		return Orders;
	}
	
	public void setOrders(List<ForApplyOrder> orders) {
		Orders = orders;
	}
}
